home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / prog_d / fwsndkey.zip / SENDKEY.TXT < prev   
Text File  |  1996-04-11  |  2KB  |  41 lines

  1. Installation
  2. Copy the files SENDKEY.DCU and SENDKEY.DCR to a library directory of your choice.
  3. Choose from within the Delphi menu bar Options, Install components, Add and select the SENDKEY.DCU file. Click OK and OK.
  4. The component is now installed in the Sample panel.
  5.  
  6. Use of the SENDKEY component
  7. TSendkey makes it simple to send Keystrokes to another application. The two functions and the UseDll property are explained below. I have tried a lot of third party units and finally ended up making my own, at least this one works. The nice thing with this component is that you can use a Dll to send multiple Keystrokes ( up to 255 characters ) or use the component without the Dll to send a small number to another application ( tested for up to 12 characters ).
  8.  
  9. Properties
  10. UseDll        False will use the VCL without the Dll to send keystrokes
  11.           True will load the Dll at runtime 
  12. ( must be in your application path or //Systems/ dir )
  13.  
  14. Functions
  15. SendKeys (S : String): integer;
  16.     This will send keystrokes to the top level application
  17. SendKeysTo(S : String; FocusHwnd : THandle): integer;
  18.     This will send keystrokes to the window belonging to FocusHwnd
  19.  
  20. Use
  21. Simply place the component on a form then call like:
  22.  form1.Sendkey1.SendKeysTo('It works',GetFocus);
  23.  
  24. Return Values are:
  25. -1  = Could not load DLL
  26.  0  = Success
  27. >0 = Exception as shown in Dll
  28.  
  29. Registration
  30. The unit will display a Msgbox when run outside the Delphi IDE, to register use
  31. SWREG # 11004  for $12.- US
  32. or send $10.- US to 
  33.  
  34. FreDsterWare ComputerTools
  35. #304-1914 Robson St.
  36. Vancouver BC
  37. V6G 1E8
  38. Canada
  39.  
  40. TechSupport
  41. You can always contact me at 73303,3532 to answer any questions.